/*************************************************************************
 *
 *   file		: CharacterRelationRecord.cs
 *   copyright		: (C) The WCell Team
 *   email		: info@wcell.org
 *   last changed	: $LastChangedDate: 2009-03-07 06:58:12 +0000 (Sat, 07 Mar 2009) $
 *   last author	: $LastChangedBy: ralekdev $
 *   revision		: $Rev: 784 $
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *************************************************************************/

using Castle.ActiveRecord;
using WCell.RealmServer.Interaction;

namespace WCell.RealmServer.Database
{
    /// <summary>
    /// Represents a character relationship entry in the database
    /// </summary>
    [ActiveRecord(Access = PropertyAccess.Property)]
    public partial class CharacterRelationRecord : ActiveRecordBase<CharacterRelationRecord>
    {
		[Field("CharacterId", NotNull = true, Access = PropertyAccess.FieldCamelcase)]
		private long _characterId;

		[Field("RelatedCharacterId", NotNull = true, Access = PropertyAccess.FieldCamelcase)]
		private long _relatedCharacterId;

        [PrimaryKey(PrimaryKeyType.Native)]
        public long CharacterRelationGuid
        {
            get;
            set;
        }

		public uint CharacterId
		{
			get
			{
				return (uint)_characterId;
			}
			set
			{
				_characterId = value;
			}
		}

		public uint RelatedCharacterId
		{
			get
			{
				return (uint)_relatedCharacterId;
			}
			set
			{
				_relatedCharacterId = value;
			}
		}

        [Property(NotNull = true)]
        public CharacterRelationType RelationType
        {
            get;
            set;
        }
		
		[Property]
		public string Note
		{
			get;
			set;
		}
	}
}
